package com.zr.repertory.affiliation.controller;

import com.zr.repertory.affiliation.model.pojo.LegalPerson;
import com.zr.repertory.affiliation.service.LegalPersonService;
import com.zr.utils.result.ResultBuilderUtil;
import com.zr.utils.result.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName LegalPersonController
 * @Description TODO 法人的查询
 * @Author 马家奎
 * @Date 2019/11/20 19:46
 */
@RestController
@CrossOrigin
@RequestMapping("legalPerson")
public class LegalPersonController {
    @Autowired
    private LegalPersonService legalPersonService;
    @GetMapping("ofCurrentUser")
    public ResultUtil queryAllLegalPerson(){
        int uid =1;
        List<LegalPerson> legalPersonList = legalPersonService.queryAll(uid);

        return ResultBuilderUtil.success(legalPersonList);
    }
}
